<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;

class SendEmails extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'stat:test';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'stat:test';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        //
    }

    // 小例子
    public function addData(){
        $time = time();
        $rand = mt_rand(1,1000);
        $id = \DB::table('data_test')->insertGetId(['uuid'=>$time,'uuid'=>uuid]);
        if($id){
            \Log::info('定时/数据插入成功.',$id);
        }else{
            \Log::error('定时/数据插入失败.',$time);
        }
    }
}
